package module;

import javax.imageio.ImageIO;
import java.awt.*;
import java.io.File;
import java.io.IOException;

public class StaticSources {
    private static String property = System.getProperty("user.dir");
    private static String imagesPath = "\\src\\main\\resources\\images\\";
    public static Image bg;
    public static Image i00;
    public static Image i254;
    public static Image i279;
    public static Image standSouth;
    public static Image standNorth;
    public static Image standEast;
    public static Image standWest;
    /**
     * 短剑
     */
    public static Image dirk;
    public static Image tree;
    public static Image ball;


    static{

        try {
            bg= read("bg.jpg");
            i00=read("00.png");
            i254=read("254.png");
            i279=read("279.png");
            standSouth=read("stand-south.png");
            standNorth=read("stand-north.png");
            standWest=read("stand-west.png");
            standEast=read("stand-east.png");
            dirk=read("030.png");
            tree=read("31.png");
            ball=read("ball.gif");

        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    private static Image read(String imageName) throws IOException {
        return ImageIO.read(new File(property+imagesPath+imageName));
    }
}
